package com.hw.Tool;

import com.google.gson.Gson;

public class ChangeJson {
    private static Gson gson1=new Gson();
    public static String toJson(Object o){
        String json=gson1.toJson(o);
        return json;
    }
    public static Object fromJson(String json,Object o){
        return gson1.fromJson(json,o.getClass());
    }
}
